# IMAGE CREATOR #
img:
	gcc -o makeimg create_image.c

## #### ##
##  SEQ ##
## #### ##

seq:
	gcc -o smoother_seq smoother_seq.c imageppm.c imagerect.c smooth.c -Wall

seq_run:
	./smoother_seq imagem.ppm out_seq.ppm

## #### ##
##  MPI ##
## #### ##

mpi:
	mpicc -o smoother_mpi smoother_mpi.c imageppm.c -Wall

mpi_local:
	mpirun -np 5 ./smoother_mpi imagem.ppm out_mpi.ppm

#-nolocal
mpi_hosts:
	mpirun -np 5 -hostfile hosts ./smoother_mpi imagem.ppm out_mpi.ppm

t:
	gcc -o smoother_mpi smoother_mpi.c imageppm.c imagerect.c smooth.c -Wall
	smoother_mpi imagem.ppm


## #### ##
## CUDA ##
## #### ##

cuda: libs
	nvcc -o smoother_cuda cuda.cu imageppm.o imagerect.o
	
libs:
	g++ -c imageppm.c imagerect.c -Wall
	
cuda_run:
	./smoother_cuda imagem.ppm out_cuda.ppm 512

	
	
## ## ##
clean:
	rm -rf *.o smoother_cuda smoother_mpi smoother_seq